

#ifndef BACKSUBPKT_H_
#define BACKSUBPKT_H_


#include "../Common/Consts.h"
#include "../Common/TimeMs.h"
#include "SubPkt.h"

class BackSubPkt {

public:

	BackSubPkt(int parEventType, float parWindow, OccurrenceType parOccurrence);

	BackSubPkt(int parEventType, Constraint *parConstraints, int parConstraintsNum, float parWindow, OccurrenceType parOccurrence);

	BackSubPkt(const BackSubPkt &pkt);

	virtual ~BackSubPkt();

	int getEventType() { return eventType; }

	int getConstraintsNum() { return constraintsNum; }

	Constraint getConstraint(int constraintsNum) { return constraints[constraintsNum]; }

	Constraint* getConstraintList() {return constraints; }

	float getWindow() { return window; }

	OccurrenceType getOccurrence() { return occurrence; }

	TimeMs getTimeStamp() { return timeStamp; }

	void setCurrentTime();

	BackSubPkt * copy();

private:

	int eventType;					// Type of the event
	Constraint *constraints;		// Set of constraints
	int constraintsNum;				// Number of attributes
	float window;					// temporal backward window
	OccurrenceType occurrence;		// occurrence of the request
	TimeMs timeStamp;
};

#endif /* BACKSUBPKT_H_ */
